package com.bajiao.mapper.product;

import com.bajiao.entity.cart.Cart;
import com.bajiao.entity.product.Product;
import com.bajiao.vo.product.ProductResponse;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 产品表
 * @Author: FanJq
 * @Date:   2024-12-13
 * @Version: V1.0
 */
public interface ProductMapper extends BaseMapper<Product> {

    /**
     * @Description
     * 获取店铺商品
     * @date 2025/2/19 17:30
     * @author FanJq
     * @param userId
     * @param storeId
     * @param classifyId
     * @return {@link List< ProductResponse>}
    */
    List<ProductResponse> getProductList(@Param("userId") String userId,
                                         @Param("storeId") String storeId,
                                         @Param("classifyId") String classifyId);

    /**
     * @Description
     * 获取商品推荐
     * @date 2025/2/20 11:37
     * @author FanJq
     * @param userId
     * @param storeId
     * @param productIds
     * @return {@link List< ProductResponse>}
    */
    List<ProductResponse> getProductRecommend(@Param("userId") String userId,
                                              @Param("storeId") String storeId,
                                              @Param("productIds") String productIds);

    /**
     * @Description
     * 获取购物车内数量
     * @date 2025/2/20 17:13
     * @author FanJq
     * @param userId
     * @param productId
     * @return {@link Integer}
    */
    Cart getProductCartInfo(@Param("userId") String userId,
                            @Param("productId") String productId);
}
